﻿function ValidEmail(emailString)
{
    return new RegExp("^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$").test(emailString);
}
function ValidDate(dateString)
{
    return new RegExp("^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2])|([1-9]))-(?:(?:[1-2][0-9])|(?:3[0-1])|([1-9])|(?:0[1-9]))$").test(dateString);
}
function ValidDateTime(dateTimeString)
{
    return new RegExp("^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2])|([1-9]))-(?:(?:[1-2][0-9])|(?:[1-3][0-1])|([1-9])|(?:0[1-9]))( (?:(?:[0-2][0-3])|(?:[0-1][0-9])|([0-9])):([0-5][0-9]|[1-9]):([0-5][0-9]|[1-9]))?$").test(dateTimeString);
}
